package com.smart.cosstarter.config;

import com.smart.cosstarter.model.DownloadObject;

import java.io.File;

/**
 * @Author: jj
 * @Date: 2019/8/22 18:08
 * @Version 1.0
 */
final class DownloadObjectInstance extends DownloadObject {
	private DownloadObjectInstance(File file, String bucket, String key) {
		super(file, bucket, key);
	}

	private DownloadObjectInstance(String absolutePath, byte[] bytes, String bucket, String key) {
		super(absolutePath, bytes, bucket, key);
	}

	private DownloadObjectInstance(String filePath, String fileName, byte[] bytes, String bucket, String key) {
		super(filePath, fileName, bytes, bucket, key);
	}

	static DownloadObject getInstance(File file, String bucket, String key) {
		return new DownloadObjectInstance(file, bucket, key);
	}

	static DownloadObject getInstance(String absolutePath, byte[] bytes, String bucket, String key) {
		return new DownloadObjectInstance(absolutePath, bytes, bucket, key);
	}

	static DownloadObject getInstance(String filePath, String fileName, byte[] bytes, String bucket, String key) {
		return new DownloadObjectInstance(filePath, fileName, bytes, bucket, key);
	}

	@Override
	public void setFile(File file) {
		super.setFile(file);
	}

	@Override
	public void setBucket(String bucket) {
		super.setBucket(bucket);
	}

	@Override
	public void setKey(String key) {
		super.setKey(key);
	}
}
